import service from '@/utils/request'

export const getPlanCourseApiList = (type:string)=>{
    if(type=='add'){
        return '/plan/course/add'
    }else if(type=='edit'){
        return '/plan/course/edit'
    }else if(type=='delete'){
        }else if(type=='list' || type=='page'){
        return '/plan/course/list'
    }else if(type=='detail'){
        return '/plan/course/get'
    }
}

export const usePlanCourseApi = (id: number) => {
    return service.get('/plan/course/get?ids=' + id)
}

export const usePlanCourseSubmitApi = (dataForm: any) => {
    if (dataForm.id) {
        return service.post('/plan/course/edit', dataForm)
    } else {
        return service.post('/plan/course/add', dataForm)
    }
}

